#include <gtest/gtest.h>
/*
TEST(测试名称， 测试用例名称)
{

}

GTest中的断言宏可以分为两类
ASSERT_系列：如果当前点检测失败则退出当前函数
EXCEPT_系列：如果当前点检测失败则继续往下执行

root@iZbp1h0s87j2bj2f1mkemiZ:~/file/gtest# ./main 
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from test1
[ RUN      ] test1.totest1
[       OK ] test1.totest1 (0 ms)
[----------] 1 test from test1 (0 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (0 ms total)
[  PASSED  ] 1 test.
*/
int Add(int num1, int num2)
{
    return num1 + num2;
}

TEST(test1, totest1)
{
    ASSERT_EQ(Add(10, 20), 30);
    //EXPECT_EQ("Hello", "hello");
    ASSERT_EQ("hello", "hello");
}

int main(int argc, char* argv[])
{
    //单元测试框架的初始化
    testing::InitGoogleTest(&argc, argv);
    //开始所有的单元测试
    return RUN_ALL_TESTS();
}